package com.wangjiang.mario.admin.common.base;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 公用基础排序父子集实体
 */
@Data
public class BaseSortParentEntity extends BaseSortEntity {

//    `tree_sorts` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所有级别排序号',
//    `code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
//    `parent_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '父级编号',
//    `parent_codes` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所有父级编号',
//    `tree_leaf` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否最末级',
//    `tree_level` decimal(4, 0) NOT NULL COMMENT '层次级别',
//    `tree_names` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '全节点名',

    @TableField(value = "code")
    @ApiModelProperty(value = "菜单编码")
    private String code;

    @TableField(value = "tree_sorts")
    @ApiModelProperty(value = "所有级别排序号，10位数字字符串，不满10位用0补足，逗号隔开")
    private String treeSorts;

    @TableField(value = "parent_code")
    @ApiModelProperty(value = "父级编号")
    private String parentCode;

    @TableField(value = "parent_codes")
    @ApiModelProperty(value = "所有父级编号")
    private String parentCodes;

    @TableField(value = "tree_leaf")
    @ApiModelProperty(value = "是否最末级")
    private String treeLeaf;

    @TableField(value = "tree_level")
    @ApiModelProperty(value = "层次级别")
    private Integer treeLevel;

    @TableField(value = "tree_names")
    @ApiModelProperty(value = "全节点名, 逗号隔开")
    private String treeNames;

    @TableField(exist = false)
    @ApiModelProperty(value = "子节点")
    private List children;
}
